using System;
using System.Collections.Generic;
using System.Text;
using AutoUpdateEngine.Testing.CustomAssert;
namespace AutoUpdateEngine.Testing.CustomAssert
{
    /// <summary>
    /// To test if every property of two instances of IOperation has the same vale
    /// </summary>
    public class OperationSameContent:AssertHasSameContent<IOperation>
    {
        public OperationSameContent(IOperation op1, IOperation op2) : base(op1, op2) { }

        protected override bool ArePropertiesEqual(IOperation o1, IOperation o2)
        {
            AppPartSameContent appAssert = new AppPartSameContent(o1.AppPart, o2.AppPart);
            bool isAppPartEqual = appAssert.Test();

            bool isTypeEqual = (o1.Type == o2.Type);
            return (isAppPartEqual && isTypeEqual);
        }
    }
}
